package bit.chapter;

import java.util.Arrays;


public class ChapterSubVO
{
    private String chapterId;

    private String subscribeWay;

    private String mcpId;

    private int startChapter;

    private byte[] chapterList;

    private transient ChapterNo chapterNo;

    /**
     * @return the chapterId
     */
    public String getChapterId()
    {
        return chapterId;
    }

    /**
     * @param chapterId the chapterId to set
     */
    public void setChapterId(String chapterId)
    {
        this.chapterId = chapterId;
    }

    /**
     * @return the subscribeWay
     */
    public String getSubscribeWay()
    {
        return subscribeWay;
    }

    /**
     * @param subscribeWay the subscribeWay to set
     */
    public void setSubscribeWay(String subscribeWay)
    {
        this.subscribeWay = subscribeWay;
    }

    /**
     * @return the mcpId
     */
    public String getMcpId()
    {
        return mcpId;
    }

    /**
     * @param mcpId the mcpId to set
     */
    public void setMcpId(String mcpId)
    {
        this.mcpId = mcpId;
    }

    /**
     * @return the startChapter
     */
    public int getStartChapter()
    {
        return startChapter;
    }

    /**
     * @param startChapter the startChapter to set
     */
    public void setStartChapter(int startChapter)
    {
        this.startChapter = startChapter;
    }

    /**
     * @return the chapterList
     */
    public byte[] getChapterList()
    {
        return chapterList;
    }

    /**
     * @param chapterList the chapterList to set
     */
    public void setChapterList(byte[] chapterList)
    {
        this.chapterList = chapterList;
    }

    /**
     * @return the chapterNo
     */
    public ChapterNo getChapterNo()
    {
        return chapterNo;
    }

    /**
     * @param chapterNo the chapterNo to set
     */
    public void setChapterNo(ChapterNo chapterNo)
    {
        this.chapterNo = chapterNo;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + ((chapterId == null) ? 0 : chapterId.hashCode());
        result = prime * result + Arrays.hashCode(chapterList);
        result = prime * result + ((mcpId == null) ? 0 : mcpId.hashCode());
        result = prime * result + startChapter;
        result = prime * result + ((subscribeWay == null) ? 0 : subscribeWay.hashCode());
        return result;
    }

    // begin no checkstyle
    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj)
    {
        if (!super.equals(obj))
        {
            return false;
        }
        if (!(obj instanceof ChapterSubVO))
        {
            return false;
        }
        ChapterSubVO other = (ChapterSubVO) obj;
        if (chapterId == null)
        {
            if (other.chapterId != null)
            {
                return false;
            }
        }
        else if (!chapterId.equals(other.chapterId))
        {
            return false;
        }
        if (!Arrays.equals(chapterList, other.chapterList))
        {
            return false;
        }
        if (mcpId == null)
        {
            if (other.mcpId != null)
            {
                return false;
            }
        }
        else if (!mcpId.equals(other.mcpId))
        {
            return false;
        }
        if (startChapter != other.startChapter)
        {
            return false;
        }
        if (subscribeWay == null)
        {
            if (other.subscribeWay != null)
            {
                return false;
            }
        }
        else if (!subscribeWay.equals(other.subscribeWay))
        {
            return false;
        }
        return true;
    }

    // end no checkstyle

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString()
    {
        StringBuilder builder = new StringBuilder();
        builder.append("ChapterSubVO [chapterId=");
        builder.append(chapterId);
        builder.append(", subscribeWay=");
        builder.append(subscribeWay);
        builder.append(", mcpId=");
        builder.append(mcpId);
        builder.append(", startChapter=");
        builder.append(startChapter);
        builder.append(", chapterList=");
        builder.append(Arrays.toString(chapterList));
        builder.append(", toString()=");
        builder.append(super.toString());
        builder.append("]");
        return builder.toString();
    }

}
